<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
	<head>
		<title>JSP for SysTeamForm form</title>
		<LINK href="css/default.css" rel="stylesheet">
		<LINK href="css/button.css" rel=stylesheet>
		<script language="javascript" type="text/javascript">
var date_start,date_end,g_object
var today = new Date();
var separator="-";
var inover=false;

function change_date(temp,mode)
{
	var t_month,t_year
    if (mode){
        if(mode==1)
        t_month=parseInt(cele_date_month.value,10)+parseInt(temp,10);
        else
        t_month=parseInt(temp)
        if (t_month<cele_date_month.options(0).text) {
            cele_date_month.value=cele_date_month.options(cele_date_month.length-1).text;
            change_date(parseInt(cele_date_year.value,10)-1,0);
            }
        else{
            if (t_month>cele_date_month.options(cele_date_month.length-1).text){
                cele_date_month.value=cele_date_month.options(0).text;
                change_date(parseInt(cele_date_year.value,10)+1,0);
                }            
            else
                {cele_date_month.value=t_month;
                 set_cele_date(cele_date_year.value,cele_date_month.value);                
                }
        }
    }  
    else{
        t_year=parseInt(temp,10);
        
        if (t_year<cele_date_year.options(0).text) {
            cele_date_year.value=cele_date_year.options(0).text;
            set_cele_date(cele_date_year.value,1);                
            }
        else{
            if (parseInt(t_year,10)>parseInt(cele_date_year.options(cele_date_year.length-1).text,10)){
                cele_date_year.value=cele_date_year.options(cele_date_year.length-1).text;
                set_cele_date(cele_date_year.value,12);                
                }            
            else
                {cele_date_year.value=t_year;
                 set_cele_date(cele_date_year.value,cele_date_month.value);                
                }
        }
    }

    window.cele_date.focus();

}

//³õÊ¼»¯ÈÕÀú
function init(d_start,d_end)
{
     var temp_str;
     var i=0
     var j=0
     date_start=new Date(1980,7,1)
     date_end=new Date(2004,8,1)
     document.writeln("<div name=\"cele_date\" id=\"cele_date\"  style=\"display:none\"    style=\"LEFT: 69px; POSITION: absolute; TOP: 159px;Z-INDEX:99\" onClick=\"event.cancelBubble=true;\" onBlur=\"hilayer()\" onMouseout=\"lostlayerfocus()\">-</div>");
     window.cele_date.innerHTML="";
     temp_str="<table border=\"1\" bgcolor=\"#DDDDDD\" bordercolor=\"white\"><tr><td colspan=7 onmouseover=\"overcolor(this)\">";
     temp_str+="<input type=\"Button\" value=\"<<\" onclick=\"change_date(-1,1)\" onmouseover=\"getlayerfocus()\" style=\"color: #000099; background-color: #BFBFBF; cursor: hand\">-";

     temp_str+=""
     temp_str+="<select name=\"cele_date_year\" id=\"cele_date_year\" language=\"javascript\" onchange=\"change_date(this.value,0)\" onmouseover=\"getlayerfocus()\" onblur=\"getlayerfocus()\" style=\"font-size: 9pt; border: 1px #666666 outset; background-color: #F4F8FB\">"

     for (i=1949;i<=2049;i++)
     {
     	temp_str+="<OPTION value=\""+i.toString()+"\">"+i.toString()+"</OPTION>";
     }
     temp_str+="</select>-";
     temp_str+=""
     temp_str+="<select name=\"cele_date_month\" id=\"cele_date_month\" language=\"javascript\" onchange=\"change_date(this.value,2)\" onmouseover=\"getlayerfocus()\" onblur=\"getlayerfocus()\" style=\"font-size: 9pt; border: 1px #666666 outset; background-color: #F4F8FB\">"

     for (i=1;i<=12;i++)
     {
     	temp_str+="<OPTION value=\""+i.toString()+"\">"+i.toString()+"</OPTION>";
     }
     temp_str+="</select>-";
     temp_str+=""
     temp_str+="<input type=\"Button\" value=\">>\" onclick=\"change_date(1,1)\" onmouseover=\"getlayerfocus()\"  style=\"color: #000099; background-color: #BFBFBF; cursor: hand\">";

     temp_str+="</td></tr><tr><td onmouseover=\"overcolor(this)\">"
     temp_str+="<font color=red>日</font></td><td>";temp_str+="一</td><td>"; temp_str+="二</td><td>"; temp_str+="三</td><td>"
     temp_str+="四</td><td>";temp_str+="五</td><td>"; temp_str+="六</td></tr>";
     for (i=1 ;i<=6 ;i++)
     {
     temp_str+="<tr>";
        for(j=1;j<=7;j++){
            temp_str+="<td name=\"c"+i+"_"+j+"\"id=\"c"+i+"_"+j+"\" style=\"CURSOR: hand\" style=\"COLOR:#000000\" language=\"javascript\" onmouseover=\"overcolor(this)\" onmouseout=\"outcolor(this)\" onclick=\"td_click(this)\">?</td>"
            }
     temp_str+="</tr>"        
     }
     temp_str+="</td></tr></table>";
     window.cele_date.innerHTML=temp_str;
}
function set_cele_date(year,month)
{
   var i,j,p,k
   var nd=new Date(year,month-1,1);
   event.cancelBubble=true;
   cele_date_year.value=year;
   cele_date_month.value=month;   
   k=nd.getDay()-1
   var temp;
   for (i=1;i<=6;i++)
      for(j=1;j<=7;j++)
      {
      eval("c"+i+"_"+j+".innerHTML=\"\"");
      eval("c"+i+"_"+j+".bgColor=\"#DDDDDD\"");
      eval("c"+i+"_"+j+".style.cursor=\"hand\"");
      }
   while(month-1==nd.getMonth())
    { j=(nd.getDay() +1);
      p=parseInt((nd.getDate()+k) / 7)+1;
      eval("c"+p+"_"+j+".innerHTML="+"\""+nd.getDate()+"\"");
      if ((nd.getDate()==today.getDate())&&(cele_date_month.value==today.getMonth()+1)&&(cele_date_year.value==today.getYear())){
      	 eval("c"+p+"_"+j+".bgColor=\"#EFFB64\"");
      }
      if (nd>date_end || nd<date_start)
      {
      eval("c"+p+"_"+j+".bgColor=\"#FF9999\"");
      eval("c"+p+"_"+j+".style.cursor=\"text\"");
      }
      nd=new Date(nd.valueOf() + 86400000)
    }
}


function show_cele_date(eP,d_start,d_end,t_object)
{
eP=document.getElementById(t_object);
window.cele_date.style.display="";
window.cele_date.style.zIndex=99
var s,cur_d
var eT = eP.offsetTop;  
var eH = eP.offsetHeight+eT;  
var dH = window.cele_date.style.pixelHeight;  
var sT = document.body.scrollTop; 
var sL = document.body.scrollLeft; 
event.cancelBubble=true;
window.cele_date.style.posLeft = event.clientX-event.offsetX+sL-5;  
window.cele_date.style.posTop = event.clientY-event.offsetY+eH+sT-5;
if (window.cele_date.style.posLeft+window.cele_date.clientWidth>document.body.clientWidth) window.cele_date.style.posLeft+=eP.offsetWidth-window.cele_date.clientWidth;
if (d_start!=""){
    if (d_start=="today"){
        date_start=new Date(today.getYear(),today.getMonth(),today.getDate());
    }else{
        s=d_start.split(separator);
        date_start=new Date(s[0],s[1]-1,s[2]);
    }
}else{
    date_start=new Date(1949,1,1);
}

if (d_end!=""){
    s=d_end.split(separator);
    date_end=new Date(s[0],s[1]-1,s[2]);
}else{
    date_end=new Date(3000,1,1);
}

//g_object=t_object
g_object=document.getElementById(t_object);

cur_d=new Date()
set_cele_date(cur_d.getYear(),cur_d.getMonth()+1);
window.cele_date.style.display="block";

window.cele_date.focus();

}
function td_click(t_object)
{
var t_d
if (parseInt(t_object.innerHTML,10)>=1 && parseInt(t_object.innerHTML,10)<=31 ) 
{ t_d=new Date(cele_date_year.value,cele_date_month.value-1,t_object.innerHTML)
if (t_d<=date_end && t_d>=date_start)
{
var year = cele_date_year.value;
var month = cele_date_month.value;
var day = t_object.innerHTML;
if (parseInt(month)<10) month = "0" + month;
if (parseInt(day)<10) day = "0" + day;

g_object.value=year+separator+month+separator+day;
window.cele_date.style.display="none";};
}

}
function h_cele_date()
{
window.cele_date.style.display="none";
}

function overcolor(obj)
{
  if (obj.style.cursor=="hand") obj.style.color = "#FFFFFF";

  inover=true;
  window.cele_date.focus();

}

function outcolor(obj)
{
	obj.style.color = "#000000";
	inover=false;

}

function getNow(o){
    var Stamp=new Date();
    var year = Stamp.getYear();
    var month = Stamp.getMonth()+1;
    var day = Stamp.getDate();
    if(month<10){
	month="0"+month;
    }
    if(day<10){
	day="0"+day;
    }
    o.value=year+separator+month+separator+day;
}

function hilayer()
{
	if (inover==false)
	{
		var lay=document.all.cele_date;
		lay.style.display="none";
	}
}
function getlayerfocus()
{
	inover=true;
}
function lostlayerfocus()
{
	inover=false;
}
init();
		function show(){
		id1.style.height=document.body.scrollHeight+"px";
		id1.style.width=document.body.scrollWidth+"px";
		id1.style.display='block';
		id2.style.display='block';
		}
		function changeselect(obj){
		  if( obj=='id1')
		  {
		     if (id1.style.display=='none')
		        id1.style.display='block';
		     else
		        id1.style.display='none'; 
		        return;  
		  }

		  id2.style.display='none';
		  id3.style.display='none';
		  id4.style.display='none';
		  id5.style.display='none';
		  id6.style.display='none';
		  id7.style.display='none';
		  
		  document.getElementById(obj).style.display='block';
		}
		function hide(){
		id1.style.display='none';
		id2.style.display='none';
		}
		function opchange(o){
		document.campCampForm.method.value=o;
		document.campCampForm.submit();
		}
		function cancelsub(){
			hide();
		}
		</script>
	</head>
	<body>
		<div id="id1" align="center">
			<table width="880" cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="146" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">营销管理</span>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<table width="850" border="0" align="center" cellpadding="5"
								cellspacing="1" bgcolor="#FF9900">
								<tr>
									<th>
										本地网名称
									</th>
									<th>
										营销活动编号
									</th>
									<th>
										营销活动名称
									</th>
									<th>
										目标客户群定义
									</th>
									<th>
										操作
										<html:link href="campCamp.do?method=list">
											<bean:message key="common.jsp.addlink" />
										</html:link>
									</th>
								</tr>
								<logic:iterate name="campcamplist" id="i" offset="startRowNo"
									length="pageSize">
									<tr bgcolor="ffffff">
										<td class="spec">
											<bean:write name="i" property="latnId" />
										</td>
										<td class="alt">
											<bean:write name="i" property="campId" />
										</td>
										<td>
											<bean:write name="i" property="campName" />
										</td>
										<td class="alt">
											<bean:write name="i" property="targetCustDesc" />
										</td>
										<td>
											<html:link href="campCamp.do?method=list&campid=${i.campId}">
												<bean:message key="common.jsp.viewlink" />
											</html:link>

										</td>
									</tr>
								</logic:iterate>
								<tr>
									<td align="center" colspan="5">
										<div align="center" style="font-size: 12">
											<a href="campCamp.do?method=list&paging=first">首页</a>
											<a href="campCamp.do?method=list&paging=previous">上一页</a>
											<a href="campCamp.do?method=list&paging=next">下一页</a>
											<a href="campCamp.do?method=list&paging=last">尾页</a>
											&nbsp;&nbsp;&nbsp;&nbsp; 第
											<bean:write name="currPage" />
											/
											<bean:write name="maxPage" />
								</tr>
							</table>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<%--if the mode if view--%>
		<logic:present name="campcamp" scope="request">
			<div align="center" id="menu">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="显示/隐藏"
					onclick="changeselect('id1')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="基本信息"
					onclick="changeselect('id2')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="营销套餐"
					onclick="changeselect('id3')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="显示区域"
					onclick="changeselect('id4')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="业务原子"
					onclick="changeselect('id5')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="营销建议"
					onclick="changeselect('id6')">
				<input class=btn_mouseout type="button"
					onmouseover="this.className=&#39;btn_mouseover&#39;"
					onmouseout="this.className=&#39;btn_mouseout&#39;"
					onmousedown="this.className=&#39;btn_mousedown&#39;"
					onmouseup="this.className=&#39;btn_mouseup&#39;" value="导入名单"
					onclick="changeselect('id7')">
			</div>

			<html:form action="/campCamp" enctype="multipart/form-data">
				<%--Div id2 Show the  the base info of one camp--%>
				<div align="left" id="id2">
					<table width="880" cellspacing="0" cellpadding="0" border="0" align="center">
						<tbody>
							<tr>
								<td width="3" height="31">
									<img height="31" src="./images/table_01.gif" width="3" />
								</td>
								<td background="./images/table_02.gif" height="31">
									<table cellspacing="0" cellpadding="0" width="146" align="left"
										border="0">
										<tbody>
											<tr>
												<td width="51" background="./images/title_1_bg.gif">
													<img height="31" src="./images/title_1.gif" width="51" />
												</td>
												<td width="95" background="./images/title_1_bg.gif">
													<span class="color_b_666">营销活动管理</span>
												</td>
											</tr>
										</tbody>
									</table>
								</td>
								<td width="3">
									<img height="31" src="./images/table_03.gif" width="3" />
								</td>
							</tr>
							<tr>
								<td width="3" background="./images/table_04.gif" width="3"
									align="right">
									<img height="100%" src="./images/table_04.gif" width="3" />
								</td>
								<td>

									<table border="0" align="center" cellpadding="5"
										cellspacing="1" bgcolor="#FF9900" width="770">
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.campid" />
											</td>
											<td>
												<html:text readonly="true" property="campcamp.campId"
													value="${campcamp.campId}" />
											</td>
											<td class="alt">
												<bean:message key="campcamp.jsp.campname" />
											</td>
											<td>
												<html:text property="campcamp.campName"
													value="${campcamp.campName}" />
													<html:hidden property="campcamp.latnId"
													value="${campcamp.latnId}" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.targetcustdesc" />
											</td>
											<td colspan="3">
												<html:text size="80" property="campcamp.targetCustDesc"
													value="${campcamp.targetCustDesc}" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.clustertype" />
											</td>
											<td>
												<logic:present name="clutypelist">
													<html:select property="campcamp.clusterType">
														<logic:iterate name="clutypelist" id="j">
															<logic:equal name="campcamp" property="clusterType"
																value="${j.codeId}">
																<html:option value="${j.codeId}">
																	<bean:write name="j" property="codeName" />
																</html:option>
															</logic:equal>
														</logic:iterate>
														<logic:iterate name="clutypelist" id="j">
															<logic:notEqual name="campcamp" property="clusterType"
																value="${j.codeId}">
																<html:option value="${j.codeId}">
																	<bean:write name="j" property="codeName" />
																</html:option>
															</logic:notEqual>
														</logic:iterate>
													</html:select>
												</logic:present>
											</td>
											<td class="alt">
												<bean:message key="campcamp.jsp.campstatus" />
											</td>
											<td>
													<logic:present name="campstatuslist">
												<html:select property="campcamp.campStatus">
														<logic:iterate name="campstatuslist" id="j">
															<logic:equal name="campcamp" property="campStatus"
																value="${j.codeId}">
																<html:option value="${j.codeId}">
																	<bean:write name="j" property="codeName" />
																</html:option>
															</logic:equal>
														</logic:iterate>
														<logic:iterate name="campstatuslist" id="j">
															<logic:notEqual name="campcamp" property="campStatus"
																value="${j.codeId}">
																<html:option value="${j.codeId}">
																	<bean:write name="j" property="codeName" />
																</html:option>
															</logic:notEqual>
														</logic:iterate>
													</html:select>
												</logic:present>
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.camptarget" />
											</td>
											<td colspan="3">
												<html:text size="80" property="campcamp.campTarget"
													value="${campcamp.campTarget}" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.schemebook" />
											</td>
											<td colspan="3">
												<html:file accept="application/msword" size="60"
													property="schemebookfile" />
												<logic:notEqual name="campcamp" property="schemeBook" value="null">
												上传的文档
												<a target="_blank"
													href="<bean:write name="campcamp" property="schemeBook" />">查看</a>
												</logic:notEqual>
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.prdinstdesc" />
											</td>
											<td colspan="3">
												<html:text size="80" property="campcamp.prdInstDesc"
													value="${campcamp.prdInstDesc}" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.campscript" />
											</td>
											<td colspan="3">
												<html:file accept="application/msword" size="60"
													property="campscriptfile" />
												<logic:notEqual name="campcamp" property="campScript" value="null">
												上传的文档
												<a target="_blank"
													href="<bean:write name="campcamp" property="campScript" />">查看</a>
												</logic:notEqual>
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.startdate" />
											</td>
											<td>
												<html:text property="campcamp.startDate"
													value="${campcamp.startDate}"
													onfocus="show_cele_date('campcamp.startDate','','','campcamp.startDate')" />
											</td>
											<td class="alt">
												<bean:message key="campcamp.jsp.enddate" />
											</td>
											<td>
												<html:text property="campcamp.endDate"
													value="${campcamp.endDate}"
													onfocus="show_cele_date('campcamp.endDate','','','campcamp.endDate')" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.remark" />
											</td>
											<td colspan="3">
												<html:textarea property="campcamp.remark"
													value="${campcamp.remark}" rows="5" cols="70" />
											</td>
										</tr>
										<tr>
											<td class="alt">
												<bean:message key="campcamp.jsp.creatorname" />
											</td>
											<td>
												<html:text readonly="true" property="campcamp.creatorName"
													value="${User_Name}" />
											</td>
											<td class="alt">
												<bean:message key="campcamp.jsp.createtime" />
											</td>
											<td>
												<html:text readonly="true" property="campcamp.createTime"
													value="${campcamp.createTime}" />
											</td>
										</tr>
									</table>
									<div align="center">
										<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('save')" />
										&nbsp;&nbsp;
										<img src='images/button_delete.gif' width="63" height="21" onclick="opchange('delete')" />
										&nbsp;&nbsp;
										<img src='images/button_reset.gif' width="63" height="21" onclick="opchange('list')" />
									</div>
								</td>
								<td background="./images/table_05.gif" width="3" align="left">
									<img height="100%" src="./images/table_05.gif" width="3">
								</td>
							</tr>
							<tr>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_06.gif" width="3px">
								</td>
								<td height=3 valign="top">
									<img height="3px" src="./images/table_07.gif" width="100%">
								</td>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_08.gif" width="3px">
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<%--Div id3 Show the  the prom info of one camp--%>
				<div align="center" id="id3" style="display: none">
					<table width="880" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr>
								<td width="3" height="31">
									<img height="31" src="./images/table_01.gif" width="3" />
								</td>
								<td background="./images/table_02.gif" height="31">
									<table cellspacing="0" cellpadding="0" width="146" align="left"
										border="0">
										<tbody>
											<tr>
												<td width="51" background="./images/title_1_bg.gif">
													<img height="31" src="./images/title_1.gif" width="51" />
												</td>
												<td width="95" background="./images/title_1_bg.gif">
													<span class="color_b_666">营销套餐</span>
												</td>
											</tr>
										</tbody>
									</table>
								</td>
								<td width="3">
									<img height="31" src="./images/table_03.gif" width="3" />
								</td>
							</tr>
							<tr>
								<td width="3" background="./images/table_04.gif" width="3"
									align="right">
									<img height="100%" src="./images/table_04.gif" width="3" />
								</td>
								<td>
									<table width="770" border="0" align="center" cellpadding="5"
										cellspacing="1" bgcolor="#FF9900">
										<tr>
											<th colspan="5">
												<bean:message key="campcamp.jsp.selectprom" />
											</th>
										</tr>
										<tr>
											<logic:present name="camppromlist">
												<%
												int i = 0, j = 0;
												%>
												<logic:iterate name="camppromlist" id="cpl">
													<%
															i = 0;
															j = (j + 1) % 5;
															if (0 == j)
																out.print("</tr><tr>");
													%>
													<logic:present name="campcamppromlist">
														<logic:iterate name="campcamppromlist" id="ccpl">
															<logic:equal name="ccpl" property="promId"
																value="${cpl.promId}">
																<%
																i = 1;
																%>
															</logic:equal>
														</logic:iterate>
													</logic:present>
													<td width="140">
														<input type="checkbox" id="campproms" name="campproms"
															value="<bean:write name="cpl" property="promId" />"
															<%=(1 == i ? "checked" : "")%> />
														<bean:write name="cpl" property="promName" />
													</td>
												</logic:iterate>
												<%
														for (; j < 5; j++)
														out.print("<td>&nbsp;</td>");
												%>
											</logic:present>
										</tr>
										<tr>
											<td colspan=5>
											<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('save')" />
											</td>
										</tr>
									</table>
								</td>
								<td background="./images/table_05.gif" width="3" align="left">
									<img height="100%" src="./images/table_05.gif" width="3">
								</td>
							</tr>
							<tr>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_06.gif" width="3px">
								</td>
								<td height=3 valign="top">
									<img height="3px" src="./images/table_07.gif" width="100%">
								</td>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_08.gif" width="3px">
								</td>
							</tr>
						</tbody>
					</table>
				</div>

				<div align="center" id="id4" style="display: none">
					<iframe name="showArea" align="middle"
						src="campshowarea.do?method=list&campid=<bean:write name="campcamp" property="campId" />"
						frameborder="0" width="100%" height="880"></iframe>
				</div>
				<div align="center" id="id5" style="display: none">
					<iframe name="showSeg" align="middle"
						src="campseg.do?method=list&campid=<bean:write name="campcamp" property="campId" />&clutype=<bean:write name="campcamp" property="clusterType" />"
						frameborder="0" width="100%" height="880"></iframe>
				</div>
				<div align="center" id="id6" style="display: none">
					<iframe name="showAdv" align="middle"
						src="campadv.do?method=list&campid=<bean:write name="campcamp" property="campId" />"
						frameborder="0" width="100%" height="880"></iframe>
				</div>
				<div align="center" id="id7" style="display: none">
					<table width="880" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr>
								<td width="3" height="31">
									<img height="31" src="./images/table_01.gif" width="3" />
								</td>
								<td background="./images/table_02.gif" height="31">
									<table cellspacing="0" cellpadding="0" width="146" align="left"
										border="0">
										<tbody>
											<tr>
												<td width="51" background="./images/title_1_bg.gif">
													<img height="31" src="./images/title_1.gif" width="51" />
												</td>
												<td width="95" background="./images/title_1_bg.gif">
													<span class="color_b_666">导入名单</span>
												</td>
											</tr>
										</tbody>
									</table>
								</td>
								<td width="3">
									<img height="31" src="./images/table_03.gif" width="3" />
								</td>
							</tr>
							<tr>
								<td width="3" background="./images/table_04.gif" width="3"
									align="right">
									<img height="100%" src="./images/table_04.gif" width="3" />
								</td>
								<td>
									<table width="770" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FF9900">
										<tr>
											<th>
												导入目标群名单：(
												<logic:equal name="campcamp" property="clusterType"
													value="1">
                            prd_inst_id
                        </logic:equal>
												<logic:notEqual name="campcamp" property="clusterType"
													value="1">
                            cust_id
                        </logic:notEqual>
												)
												<input class=btn_mouseout type="button"
													onmouseover="this.className=&#39;btn_mouseover&#39;"
													onmouseout="this.className=&#39;btn_mouseout&#39;"
													onmousedown="this.className=&#39;btn_mousedown&#39;"
													onmouseup="this.className=&#39;btn_mouseup&#39;"
													value="开始导入" onclick="opchange('importname')">
												<FONT color="#ff0000"><html:errors property="success" />
												</FONT>
												<br>
											</th>
										</tr>
										<tr>
											<td>
												<input type="radio" name="importmode" value="custclu"
													checked />
												从划分的目标群导入：
												<select name="custcluid">
													<logic:present name="custclulist">
														<logic:iterate name="custclulist" id="ccll">
															<option
																value="<bean:write name="ccll" property="custCluId" />">
																<bean:write name="ccll" property="latnId" />
																-
																<bean:write name="ccll" property="custCluName" />
																-(用户数:
																<bean:write name="ccll" property="prdNbr" />
																)
															</option>
														</logic:iterate>
													</logic:present>
												</select>
											</td>
										</tr>

										<tr>
											<td>
												<input type="radio" value="file" name="importmode" />
												从文件导入：
												（<input type="radio" value="text" name="fileType" checked />文本文件
												  <input type="radio" value="excel" name="fileType" />EXCEL文件）
												（<input type="radio" value="1" name="nbrType" checked />电话号码
												  <input type="radio" value="2" name="nbrType" />产品实例号
												  <input type="radio" value="3" name="nbrType" />客户编号）
												<br/>
												<html:file size="60" property="importfile" />
												<br>
											</td>
										</tr>
										<tr>
											<td>
												<input type="radio" value="custsql" name="importmode" />
												自定义SQL导入：
												<br />
												<TEXTAREA name="custsql" cols="50"></TEXTAREA>
												<!--input type="button" value="检验SQL"-->
											</td>
										</tr>
										<tr>
											<td>
											<table width="770" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FF9900">
												<tr>
													<th colspan="2">
														防止客户过渡打扰机制：（满足下列条件的客户将不能参与本次营销活动）
													</th>
												</tr>
												<tr>
													<td width="170">这段时间内被呼叫过：</td>
													<td width="600">
														<select name="inMonth">
															<option value="">请选择时间范围</option>
															<option value="1">1个月</option>
															<option value="2">2个月</option>
															<option value="3">3个月</option>
															<option value="6">4个月－6个月</option>
															<option value="12">7个月－1年</option>
														</select>
													</td>
												</tr>
												<tr>
													<td>参与过下列营销活动：</td>
													<td>
														<logic:iterate name="campcamplist" id="camp">
															<input type="checkbox" name="inCampId" value="${camp.campId}">${camp.campName}<br/>
														</logic:iterate>
													</td>
												</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
								<td background="./images/table_05.gif" width="3" align="left">
									<img height="100%" src="./images/table_05.gif" width="3">
								</td>
							</tr>
							<tr>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_06.gif" width="3px">
								</td>
								<td height=3 valign="top">
									<img height="3px" src="./images/table_07.gif" width="100%">
								</td>
								<td height=3 valign="top">
									<img height="12px" src="./images/table_08.gif" width="3px">
								</td>
							</tr>
						</tbody>
					</table>
				</div>

				<html:hidden property="method" value="" />
				<html:hidden property="campid" value="${campid}" />
			</html:form>
		</logic:present>
		<logic:notPresent name="campcamp" scope="request">
			<html:form action="/campCamp">
				<table width="400" border="0" align="center" cellpadding="5" cellspacing="1"
					bgcolor="#FF9900">
					<tr>
						<th colspan="2">
							<bean:message key="campcamp.jsp.newcamp" />
						</th>
					</tr>
					<tr>
						<td class="spec">
							<bean:message key="campcamp.jsp.campname" />
						</td>
						<td>
							<html:text property="campcamp.campName"  size="40" />
						</td>
					</tr>
					<tr>
						<td class="spec">
							<bean:message key="campcamp.jsp.clustertype" />
						</td>
						<td>
							<logic:present name="clutypelist">
								<html:select property="campcamp.clusterType">
									<logic:iterate name="clutypelist" id="j">
										<html:option value="${j.codeId}">
											<bean:write name="j" property="codeName" />
										</html:option>
									</logic:iterate>
								</html:select>
							</logic:present>
						</td>
					</tr>
					<tr>
						<td>
							<bean:message key="sysdepart.jsp.latnid" />
						</td>
						<td>
							<logic:present name="sysloclatnlist">
								<html:select property="campcamp.latnId">
									<logic:iterate name="sysloclatnlist" id="j">
										<html:option value="${j.latnid}">
											<bean:write name="j" property="latnname" />
										</html:option>
									</logic:iterate>
								</html:select>
							</logic:present>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="2">
							<div align="center" id="commit">
								<html:hidden property="method" value="save" />
								<img src='images/button_addnew.gif' width="63" height="21" onclick="opchange('save')" />
								&nbsp;&nbsp;
								<img src='images/button_cancel.gif' width="63" height="21" onclick="opchange('list')" />
							</div>
						</td>
					</tr>
				</table>
				<html:hidden property="method" value="save" />
			</html:form>
		</logic:notPresent>
		<logic:equal name="targetdiv" value="div7">
			<script language="javascript" type="text/javascript">changeselect('id7');</script>
		</logic:equal>
	</body>
</html>

